home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / usr / share / laptop-mode-tools / modules / sched-mc-power-savings < prev    next >
Text File  |  2009-10-06  |  1KB  |  28 lines

  1. #! /bin/sh
  2. # Laptop mode tools module: Scheduler tunables for multi-socket/multi-core systems.
  3. #
  4.  
  5. if [ x$CONTROL_SCHED_MC_POWER_SAVINGS = x1 ] ; then
  6.     if [ $ON_AC -eq 1 ]; then
  7.         $LM_VERBOSE && echo "On AC power: setting scheduler power saving to 0." >> $OUTPUT
  8.         if [ -w /sys/devices/system/cpu/sched_mc_power_savings ]; then
  9.             echo 0 > /sys/devices/system/cpu/sched_mc_power_savings 
  10.             $LM_VERBOSE && echo "Scheduler power save mode disabled." >> $OUTPUT
  11.         else
  12.             $LM_VERBOSE && echo "Scheduler power saving is not available." >> $OUTPUT
  13.         fi
  14.     else
  15.         $LM_VERBOSE && echo "On battery: setting scheduler power saving to 1." >> $OUTPUT
  16.         if [ -w /sys/devices/system/cpu/sched_mc_power_savings ]; then
  17.             echo 2 > /sys/devices/system/cpu/sched_mc_power_savings 
  18.             $LM_VERBOSE && echo "Scheduler power save mode enabled." >> $OUTPUT
  19.         else
  20.             $LM_VERBOSE && echo "Scheduler power saving is not available." >> $OUTPUT
  21.         fi
  22.  
  23.     fi
  24. else
  25.     $LM_VERBOSE && echo "Scheduler power setting is disabled." >> $OUTPUT
  26. fi
  27.